package com.talent.web.controller;

import com.talent.web.model.TalentResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @ClassName：DemoController
 * @Author: hszhou
 * @Date: 2024/10/21 13:35
 * @Description: 菜单控制器
 */
@RestController
@RequestMapping("/demo")
public class DemoController {
    private static Logger logger = LoggerFactory.getLogger(DemoController.class);

    @GetMapping("add")
    @PreAuthorize("hasAuthority('user:add')")
    public TalentResult<Void> da(){

        logger.info("进入");
        return TalentResult.success();
    }

    @GetMapping("delete")
    @PreAuthorize("hasAuthority('user:delete')")
    public TalentResult<Void> insertUser(){
        return TalentResult.success();
    }

}
